package com.nightpiter.view.drawer.rapid;

import static com.nightpiter.view.drawer.rapid.Config.transferWidth;
import static com.nightpiter.view.drawer.rapid.Config.tunnelWidth;

import com.nightpiter.view.graphics.Canvas;
import com.nightpiter.view.graphics.Paint;
import com.nightpiter.view.graphics.abstaractions.AbstractPaint.Style;

public abstract class LinkDrawer {

	private static Paint tunnelPaint = new Paint();

	private static Paint transferPaint = new Paint();

	static {

		tunnelPaint.setAntiAlias(true);
		tunnelPaint.setStrokeCap(Paint.Cap.ROUND);

		transferPaint.setAntiAlias(true);
		transferPaint.setStrokeCap(Paint.Cap.BUTT);
		transferPaint.setStyle(Style.FILL_AND_STROKE);
		transferPaint.setColor(Config.DEFAULT_COLOR);

	}

	public static void setup() {
		tunnelPaint.setStrokeWidth(tunnelWidth);
		transferPaint.setStrokeWidth(transferWidth);
	}

	public static Paint getTransferPaint() {
		return transferPaint;
	}

	public static Paint getTunnelPaint() {
		return tunnelPaint;
	}

	public abstract void draw(Canvas canvas, Link link);

}
